cmake_minimum_required(VERSION 3.0.0)
project(ipc VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)

include_directories(
    interfaces/innerkits/ipc_core/include 
    ipc/native/c/adapter/access_token/include
    ipc/native/c/rpc/include
    ipc/native/src/core/include
    ipc/native/src/mock/include
    ipc/trace
    utils/include
)
add_library(
    ipc
    SHARED 
    ipc/native/c/adapter/access_token/src/access_token_adapter.c
    ipc/native/c/rpc/src/rpc_feature_set.c
    ipc/native/src/core/source/buffer_object.cpp
    ipc/native/src/core/source/comm_auth_info.cpp
    ipc/native/src/core/source/ipc_file_descriptor.cpp
    ipc/native/src/core/source/ipc_object_proxy.cpp
    ipc/native/src/core/source/ipc_object_stub.cpp
    ipc/native/src/core/source/ipc_process_skeleton.cpp
    ipc/native/src/core/source/ipc_skeleton.cpp
    ipc/native/src/core/source/ipc_thread_pool.cpp
    ipc/native/src/core/source/ipc_thread_skeleton.cpp
    ipc/native/src/core/source/ipc_workthread.cpp
    ipc/native/src/core/source/iremote_broker.cpp
    ipc/native/src/core/source/iremote_object.cpp
    ipc/native/src/core/source/message_option.cpp
    ipc/native/src/core/source/message_parcel.cpp
    ipc/native/src/core/source/peer_holder.cpp
    ipc/native/src/core/source/stub_refcount_object.cpp
    ipc/native/src/mock/source/binder_connector.cpp
    ipc/native/src/mock/source/binder_debug.cpp
    ipc/native/src/mock/source/binder_invoker.cpp
    ipc/native/src/mock/source/hitrace_invoker.cpp
    ipc/native/src/mock/source/invoker_factory.cpp
    ipc/native/src/mock/source/invoker_rawdata.cpp
    ipc/trace/native/hitrace.cpp
    ipc/trace/native/hitracec.c    
    ipc/trace/native/hitraceid.cpp   
)
target_compile_definitions(ipc PUBLIC BUILD_PUBLIC_VERSION CONFIG_IPC_SINGLE)
target_link_libraries(ipc PUBLIC ohos_hilog)
target_link_libraries(ipc PUBLIC ohos_utils)

target_include_directories(ipc PUBLIC inc interfaces/innerkits/ipc_core/include)